package xyz.weizhi.diy;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;

/**
 * @Author milian
 * @Date 2021/9/5 0005 18:36
 */
@Aspect
public class annotionPointCut {
    @Before("execution(* xyz.weizhi.UserServerImp.*(..))")
    public void Before(){
        System.out.println("方法执行之前");
    }
    @After("execution(* xyz.weizhi.UserServerImp.*(..))")
    public void After(){
        System.out.println("方法执行之后");
    }
    @Around("execution(* xyz.weizhi.UserServerImp.*(..))")
    public void around(ProceedingJoinPoint jp) throws Throwable {
        System.out.println("环绕前");
        Object proceed = jp.proceed();
        System.out.println("环绕后");

    }
}
